{// 引入标签库 }
<tagLib name="html" />
<include file="Public:header" />
<PHP>
	function get_handle($id)
	{
		
        $str = l("IPS_VIEW");
        
		$str = "<a href='".u("Ipslog/trade_view",array("id"=>$id))."'>".$str."</a>";
		
		return $str;
	}
	function get_p_t_status($status)
	{
		return l("P_T_STATUS_".$status);
	}
    function get_deal_name($deal_id)
    {
    	return M("deal")->where(" id=".$deal_id)->getField("name");
    }
	function get_unit($unit_id)
	{
		return l("P_TRD_CYCLE_TYPE_".$unit_id);
	}
    function get_bid_status($bid_status)
	{
    	if($bid_status>0)
			return l("P_BID_STATUS_".$bid_status);
	}
    function get_replay_mode($replay_mode)
	{
		return l("P_REPAY_MODE_".$replay_mode);
	}
    function get_o_type($o_type)
	{
		return l("P_OPERACTION_TYPE_".$o_type);
	}
	function get_acct_type($acct_type)
	{
		return l("P_ACCT_TYPE_".$acct_type);
	}
	function get_call_back($back)
	{
		return l("IPS_IS_CALLBACK_".$back);
	}
</php>
<load href='__TMPL__Common/js/jquery.bgiframe.js' />
<load href='__TMPL__Common/js/jquery.weebox.js' />
<load href='__TMPL__Common/style/weebox.css' />
<script type="text/javascript" src="__TMPL__Common/js/calendar/calendar.php?lang=zh-cn" ></script>
<load href='__TMPL__Common/js/calendar/calendar.css' />
<load href='__TMPL__Common/js/calendar/calendar.js' />
<div class="main">
<div class="main_title">{%P_TRADE_TITLE}</div>
<div class="blank5"></div>
<form name="search" action="__APP__" method="get">	
<div class="button_row">
	<if condition="!$_REQUEST['referer']">
	<input type="button" class="button" value="{%EXPORT}" onclick="m_export_csv('trade_');" />
	</if>
</div>
<div class="blank5"></div>
<div class="search_row">
		
        {%P_BID_NO}：<input type="text" class="textbox" name="pBidNo" value="{:trim($_REQUEST['pBidNo'])}" style="width:100px;" />
		{%P_MER_CODE}：<input type="text" class="textbox" name="pMerCode" value="{:trim($_REQUEST['pMerCode'])}" style="width:100px;" />
		{%P_MER_BILL_NO}：<input type="text" class="textbox" name="pMerBillNo" value="{:trim($_REQUEST['pMerBillNo'])}" style="width:100px;" />
        
        {%P_T_STATUS}：<select name="status">
				<option value="-1" <if condition="intval($_REQUEST['status']) eq -1 || $_REQUEST['status'] eq ''">selected="selected"</if>>{%ALL}</option>
				<option value="0" <if condition="$_REQUEST['status'] neq '' && intval($_REQUEST['status']) eq 0">selected="selected"</if>>{%P_T_STATUS_0}</option>
				<option value="1" <if condition="intval($_REQUEST['status']) eq 1">selected="selected"</if>>{%P_T_STATUS_1}</option>		
                <option value="2" <if condition="intval($_REQUEST['status']) eq 2">selected="selected"</if>>{%P_T_STATUS_2}</option>	
		</select>
        
        {%P_TRD_CYCLE_TYPE}：<select name="pTrdCycleType">
				<option value="-1" <if condition="intval($_REQUEST['pTrdCycleType']) eq -1 || $_REQUEST['pTrdCycleType'] eq ''">selected="selected"</if>>{%ALL}</option>
				<option value="1" <if condition="$_REQUEST['pTrdCycleType'] neq '' && intval($_REQUEST['pTrdCycleType']) eq 1">selected="selected"</if>>{%P_TRD_CYCLE_TYPE_1}</option>
				<option value="3" <if condition="intval($_REQUEST['pTrdCycleType']) eq 3">selected="selected"</if>>{%P_TRD_CYCLE_TYPE_3}</option>	
		</select>
		{%P_REPAY_MODE}：<select name="pRepayMode">
				<option value="-1" <if condition="intval($_REQUEST['pRepayMode']) eq -1 || $_REQUEST['pRepayMode'] eq ''">selected="selected"</if>>{%ALL}</option>
				<option value="1" <if condition="$_REQUEST['pRepayMode'] neq '' && intval($_REQUEST['pRepayMode']) eq 1">selected="selected"</if>>{%P_REPAY_MODE_1}</option>
				<option value="2" <if condition="intval($_REQUEST['pRepayMode']) eq 2">selected="selected"</if>>{%P_REPAY_MODE_2}</option>		
                <option value="3" <if condition="intval($_REQUEST['pRepayMode']) eq 3">selected="selected"</if>>{%P_REPAY_MODE_3}</option>		
                <option value="99" <if condition="intval($_REQUEST['pRepayMode']) eq 99">selected="selected"</if>>{%P_REPAY_MODE_99}</option>		
		</select>
          <div class="blank5"></div>
        {%P_OPERACTION_TYPE}：<select name="pOperationType">
				<option value="-1" <if condition="intval($_REQUEST['pOperationType']) eq -1 || $_REQUEST['pOperationType'] eq ''">selected="selected"</if>>{%ALL}</option>
				<option value="1" <if condition="$_REQUEST['pOperationType'] neq '' && intval($_REQUEST['pOperationType']) eq 1">selected="selected"</if>>{%P_OPERACTION_TYPE_1}</option>
				<option value="2" <if condition="intval($_REQUEST['pOperationType']) eq 2">selected="selected"</if>>{%P_OPERACTION_TYPE_2}</option>			
		</select>
        
        {%P_ACCT_TYPE}：<select name="pAcctType">
				<option value="-1" <if condition="intval($_REQUEST['pAcctType']) eq -1 || $_REQUEST['pAcctType'] eq ''">selected="selected"</if>>{%ALL}</option>
				<option value="0" <if condition="$_REQUEST['pAcctType'] neq '' && intval($_REQUEST['pAcctType']) eq 0">selected="selected"</if>>{%P_ACCT_TYPE_0}</option>
				<option value="1" <if condition="intval($_REQUEST['pAcctType']) eq 1">selected="selected"</if>>{%P_ACCT_TYPE_1}</option>			
		</select>
       
        {%P_BID_STATUS}：<select name="pBidStatus">
				<option value="-1" <if condition="intval($_REQUEST['pBidStatus']) eq -1 || $_REQUEST['pBidStatus'] eq ''">selected="selected"</if>>{%ALL}</option>
				<option value="1" <if condition="$_REQUEST['pBidStatus'] neq '' && intval($_REQUEST['pBidStatus']) eq 1">selected="selected"</if>>{%P_BID_STATUS_1}</option>
				<option value="2" <if condition="intval($_REQUEST['pBidStatus']) eq 2">selected="selected"</if>>{%P_BID_STATUS_2}</option>		
                <option value="3" <if condition="$_REQUEST['pBidStatus'] neq '' && intval($_REQUEST['pBidStatus']) eq 3">selected="selected"</if>>{%P_BID_STATUS_3}</option>
				<option value="8" <if condition="intval($_REQUEST['pBidStatus']) eq 8">selected="selected"</if>>{%P_BID_STATUS_8}</option>			
                <option value="9" <if condition="$_REQUEST['pBidStatus'] neq '' && intval($_REQUEST['pBidStatus']) eq 9">selected="selected"</if>>{%P_BID_STATUS_9}</option>
				<option value="10" <if condition="intval($_REQUEST['pBidStatus']) eq 10">selected="selected"</if>>{%P_BID_STATUS_10}</option>				
		</select>
        

      	{%P_REG_DATE}：
		<input type="text" class="textbox" name="start_time" id="start_time" value="{:trim($_REQUEST['start_time'])}" onfocus="return showCalendar('start_time', '%Y-%m-%d', false, false, 'start_time');" />
		-
		<input type="text" class="textbox" name="end_time" id="end_time" value="{:trim($_REQUEST['end_time'])}" onfocus="return showCalendar('end_time', '%Y-%m-%d', false, false, 'end_time');" />
		
		
        
		<input type="hidden" value="Ipslog" name="m" />
		<input type="hidden" value="create" name="a" />

		<input type="hidden" value="Ipslog" name="m" />
		<input type="hidden" value="trade" name="a" />
		<input type="submit" class="button" value="{%SEARCH}" />

</div>
</form>
<div class="blank5"></div>
<html:list 
	id="dataTable" 
	style="dataTable" 
	name="ips_register_subject" 
	action="true" 
	datasource="list" 
	show="id:{%ID}
    	 ,pMerCode:{%P_MER_CODE}
         ,deal_id|get_deal_name:{%DEAL_NAME}
         ,status|get_p_t_status:{%P_T_STATUS}
         ,pMerBillNo:{%P_MER_BILL_NO}
		 ,pBidNo:{%P_BID_NO}
		 ,pRegDate:{%P_REG_DATE}
		 ,pLendAmt:{%P_LEND_AMT}
         ,pGuaranteesAmt:{%P_GUARANTEES_AMT}
         ,pTrdLendRate:{%P_TRD_LEND_RATE}
         ,pTrdCycleValue:{%P_TRD_CYCLE_VALUE}
		 ,pTrdCycleType|get_unit:{%P_TRD_CYCLE_TYPE}
         ,pRepayMode|get_replay_mode:{%P_REPAY_MODE}
         ,pOperationType|get_o_type:{%P_OPERACTION_TYPE}
         ,pAcctType|get_acct_type:{%P_ACCT_TYPE}
         ,pRealName:{%P_REAL_NAME}
         ,pBidStatus|get_bid_status:{%P_BID_STATUS}"
	actionlist="id|get_handle" /> 
<div class="blank5"></div>
<div class="page">{$page}</div>
</div>
<include file="Public:footer" />

<!--
		 ,'P_STATUS':{%P_STATUS}
         ,P_BANK_NAME':{%P_BANK_NAME}
         ,'P_BK_ACC_NAME':{%P_BK_ACC_NAME}
         ,'P_BK_ACC_NO':{%P_BK_ACC_NO}
         ,'P_CARD_STATUS':{%P_CARD_STATUS}
         ,'P_PH_STATUS':{%P_PH_STATUS}
         ,'P_IPS_ACCE_NO':{%P_IPS_ACCE_NO}
         ,'P_IPS_ACCE_DATE':{%P_IPS_ACCE_DATE}
         ,'P_MER_CODE':{%P_MER_CODE}
         ,'P_ERR_CODE':{%P_ERR_CODE}
         ,'P_ERR_MSG':{%P_ERR_MSG}
         ,'IS_CALLBACK':{%IS_CALLBACK}
-->